[llvm-commits] [125983] No need to map llvm values with GCC trees using names.
dpatel at apple.com
dpatel at apple.com
Wed Apr 11 10:17:12 PDT 2007
Revision: 125983
Author: dpatel
Date: 2007-04-11 10:17:11 -0700 (Wed, 11 Apr 2007)
Log Message:
-----------
No need to map llvm values with GCC trees using names.
llvm.pch.values table can directly hold values.
Modified Paths:
--------------
apple-local/branches/llvm/gcc/llvm-convert.cpp
Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-11 11:13:54 UTC (rev 125982)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-11 17:17:11 UTC (rev 125983)
@@ -198,18 +198,10 @@
for (std::vector<Value *>::iterator I = LLVMValues.begin(),
E = LLVMValues.end(); I != E; ++I) {
- Value *V = *I;
-
- if (!V) {
- LLVMValuesNames.push_back(ConstantArray::get("", false));
- continue;
- }
-
- // Give names to nameless values.
- if (!V->hasName())
- V->setName("llvm.fe.val");
-
- LLVMValuesNames.push_back(ConstantArray::get(V->getName(), false));
+ if (Constant *C = dyn_cast<Constant>(*I))
+ LLVMValuesNames.push_back(C);
+ else
+ LLVMValuesNames.push_back(NULL);
}
// Create string table.
More information about the llvm-commits
mailing list