[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y
Chris Lattner
lattner at cs.uiuc.edu
Thu Jul 15 18:18:20 PDT 2004
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.y updated: 1.189 -> 1.190
---
Log message:
Fix the regressions handling unnamed global variables
---
Diffs of the changes: (+5 -2)
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.189 llvm/lib/AsmParser/llvmAsmParser.y:1.190
--- llvm/lib/AsmParser/llvmAsmParser.y:1.189 Wed Jul 14 18:07:13 2004
+++ llvm/lib/AsmParser/llvmAsmParser.y Thu Jul 15 20:18:09 2004
@@ -561,6 +561,7 @@
GV->setInitializer(Initializer);
GV->setLinkage(Linkage);
GV->setConstant(isConstantGlobal);
+ InsertValue(GV, CurModule.Values);
return;
}
@@ -595,8 +596,10 @@
}
// Otherwise there is no existing GV to use, create one now.
- new GlobalVariable(Ty, isConstantGlobal, Linkage, Initializer, Name,
- CurModule.CurrentModule);
+ GlobalVariable *GV =
+ new GlobalVariable(Ty, isConstantGlobal, Linkage, Initializer, Name,
+ CurModule.CurrentModule);
+ InsertValue(GV, CurModule.Values);
}
// setTypeName - Set the specified type to the name given. The name may be
More information about the llvm-commits
mailing list