[llvm-commits] [llvm] r53003 - /llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
Bill Wendling
isanbard at gmail.com
Tue Jul 1 17:50:03 PDT 2008
Author: void
Date: Tue Jul 1 19:50:02 2008
New Revision: 53003
URL: http://llvm.org/viewvc/llvm-project?rev=53003&view=rev
Log:
Use the canonical form for getting an empty structure.
Modified:
llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=53003&r1=53002&r2=53003&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Tue Jul 1 19:50:02 2008
@@ -250,10 +250,7 @@
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 @@
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 @@
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 @@
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 @@
// Set up elements vector
std::vector<Constant*> Elements;
+
// Add fields.
DISerializeVisitor SRAM(*this, Elements);
SRAM.ApplyToFields(DD);
More information about the llvm-commits
mailing list