[llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Apr 16 15:29:04 PDT 2003
Changes in directory llvm/lib/Transforms/Instrumentation/ProfilePaths:
ProfilePaths.cpp updated: 1.25 -> 1.26
---
Log message:
Add new linkage types to support a real frontend
---
Diffs of the changes:
Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.25 llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.26
--- llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.25 Fri Feb 14 14:37:42 2003
+++ llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp Wed Apr 16 15:28:42 2003
@@ -183,14 +183,19 @@
for(int xi=0; xi<numPaths; xi++)
arrayInitialize.push_back(ConstantSInt::get(Type::IntTy, 0));
- Constant *initializer = ConstantArray::get(ArrayType::get(Type::IntTy, numPaths), arrayInitialize);
- GlobalVariable *countVar = new GlobalVariable(ArrayType::get(Type::IntTy, numPaths), false, true, initializer, "Count", F.getParent());
+ const ArrayType *ATy = ArrayType::get(Type::IntTy, numPaths);
+ Constant *initializer = ConstantArray::get(ATy, arrayInitialize);
+ GlobalVariable *countVar = new GlobalVariable(ATy, false,
+ GlobalValue::InternalLinkage,
+ initializer, "Count",
+ F.getParent());
static GlobalVariable *threshold = NULL;
static bool insertedThreshold = false;
if(!insertedThreshold){
- threshold = new GlobalVariable(Type::IntTy, false, false, 0,
- "reopt_threshold");
+ threshold = new GlobalVariable(Type::IntTy, false,
+ GlobalValue::ExternalLinkage, 0,
+ "reopt_threshold");
F.getParent()->getGlobalList().push_back(threshold);
insertedThreshold = true;
More information about the llvm-commits
mailing list