[opengtl-commits] [258] show the llvm::Type in the debug stream as well |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 258
Author: cyrille
Date: 2008-06-29 10:46:23 +0200 (Sun, 29 Jun 2008)
Log Message:
-----------
show the llvm::Type in the debug stream as well
Modified Paths:
--------------
trunk/OpenGTL/OpenGTL/GTLCore/Debug.cpp
Modified: trunk/OpenGTL/OpenGTL/GTLCore/Debug.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Debug.cpp 2008-06-27 22:32:21 UTC (rev 257)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Debug.cpp 2008-06-29 08:46:23 UTC (rev 258)
@@ -22,12 +22,14 @@
#include <map>
#include <fstream>
+#include <llvm/Type.h>
#include <llvm/System/Path.h>
#include "Macros_p.h"
#include "ScopedName.h"
#include "Token_p.h"
#include "Type.h"
+#include "Type_p.h"
using namespace GTLCore;
@@ -222,7 +224,7 @@
std::ostream& operator<< (std::ostream& ostr, const GTLCore::ScopedName& name)
{
- return ostr << name.toString() ;
+ return ostr <<name.toString() ;
}
std::ostream& operator<< (std::ostream& ostr, const GTLCore::Type& type)
@@ -230,39 +232,55 @@
switch(type.dataType())
{
case Type::UNDEFINED:
- return ostr << "UNDEFINED";
+ ostr << "UNDEFINED";
+ break;
case Type::BOOLEAN:
- return ostr << "BOOLEAN";
+ ostr <<"BOOLEAN";
+ break;
case Type::INTEGER8:
- return ostr << "INTEGER8";
+ ostr <<"INTEGER8";
+ break;
case Type::UNSIGNED_INTEGER8:
- return ostr << "UNSIGNED_INTEGER8";
+ ostr <<"UNSIGNED_INTEGER8";
+ break;
case Type::INTEGER16:
- return ostr << "INTEGER16";
+ ostr <<"INTEGER16";
+ break;
case Type::UNSIGNED_INTEGER16:
- return ostr << "UNSIGNED_INTEGER16";
+ ostr <<"UNSIGNED_INTEGER16";
+ break;
case Type::INTEGER32:
- return ostr << "INTEGER32";
+ ostr <<"INTEGER32";
+ break;
case Type::UNSIGNED_INTEGER32:
- return ostr << "UNSIGNED_INTEGER32";
+ ostr <<"UNSIGNED_INTEGER32";
+ break;
case Type::DOUBLE:
- return ostr << "DOUBLE";
+ ostr <<"DOUBLE";
+ break;
case Type::FLOAT:
- return ostr << "FLOAT";
+ ostr <<"FLOAT";
+ break;
case Type::HALF:
- return ostr << "HALF";
+ ostr <<"HALF";
+ break;
case Type::VOID:
- return ostr << "VOID";
+ ostr <<"VOID";
+ break;
case Type::STRUCTURE:
- return ostr << "STRUCTURE";
+ ostr <<"STRUCTURE";
+ break;
case Type::ARRAY:
- return ostr << "ARRAY[" << *type.embeddedType() << "]";
+ ostr <<"ARRAY[" << *type.embeddedType() << "]";
+ break;
case Type::POINTER:
- return ostr << "POINTER";
+ ostr <<"POINTER";
+ break;
case Type::VECTOR:
- return ostr << "VECTOR[" << type.vectorSize() << "," << *type.embeddedType() << "]";
+ ostr <<"VECTOR[" << type.vectorSize() << "," << *type.embeddedType() << "]";
+ break;
}
- return ostr;
+ return ostr << " " << *type.d->type();
}
std::ostream& operator<< (std::ostream& ostr, const GTLCore::Token& token)
{