diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-07-02 00:50:02 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-07-02 00:50:02 +0000 |
commit | 536fb95321ca6434445d8a09e1c3b52334ca7f9d (patch) | |
tree | 6a8d6094b5bc34148ede6cb965bea753b6570567 /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | 8e631a026779f0ffc25fb24f603adf01d16bc042 (diff) | |
download | bcm5719-llvm-536fb95321ca6434445d8a09e1c3b52334ca7f9d.tar.gz bcm5719-llvm-536fb95321ca6434445d8a09e1c3b52334ca7f9d.zip |
Use the canonical form for getting an empty structure.
llvm-svn: 53003
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 473b60554b6..bdd771bb2b1 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -250,10 +250,7 @@ private: public: DISerializeVisitor(DISerializer &S, std::vector<Constant*> &E) - : DIVisitor() - , SR(S) - , Elements(E) - {} + : DIVisitor(), SR(S), Elements(E) {} /// Apply - Set the value of each of the fields. /// @@ -337,10 +334,7 @@ private: public: DIGetTypesVisitor(DISerializer &S, std::vector<const Type*> &F) - : DIVisitor() - , SR(S) - , Fields(F) - {} + : DIVisitor(), SR(S), Fields(F) {} /// Apply - Set the value of each of the fields. /// @@ -511,8 +505,7 @@ const PointerType *DISerializer::getEmptyStructPtrType() { if (EmptyStructPtrTy) return EmptyStructPtrTy; // Construct the pointer to empty structure type. - const StructType *EmptyStructTy = - StructType::get(std::vector<const Type*>()); + const StructType *EmptyStructTy = StructType::get(NULL, NULL); // Construct the pointer to empty structure type. EmptyStructPtrTy = PointerType::getUnqual(EmptyStructTy); @@ -529,6 +522,7 @@ const StructType *DISerializer::getTagType(DebugInfoDesc *DD) { if (!Ty) { // Set up fields vector. std::vector<const Type*> Fields; + // Get types of fields. DIGetTypesVisitor GTAM(*this, Fields); GTAM.ApplyToFields(DD); @@ -596,6 +590,7 @@ GlobalVariable *DISerializer::Serialize(DebugInfoDesc *DD) { // Set up elements vector std::vector<Constant*> Elements; + // Add fields. DISerializeVisitor SRAM(*this, Elements); SRAM.ApplyToFields(DD); |