summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-21 17:39:59 +0000
committerChris Lattner <sabre@nondot.org>2003-10-21 17:39:59 +0000
commit389dbfbd8b0e49968a3ddaee90c3486b4740f146 (patch)
treee7dfb1f5ad3a5b08b5db3c2f1b6aeaefd5c99ce7 /lib
parent08d702b61db4d6140ffede9a93354d199b436e4b (diff)
downloadllvm-389dbfbd8b0e49968a3ddaee90c3486b4740f146.tar.gz
llvm-389dbfbd8b0e49968a3ddaee90c3486b4740f146.tar.bz2
llvm-389dbfbd8b0e49968a3ddaee90c3486b4740f146.tar.xz
Fix problem which effected linking apache
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Bytecode/Writer/SlotCalculator.cpp8
-rw-r--r--lib/VMCore/Constants.cpp2
-rw-r--r--lib/VMCore/SlotCalculator.cpp8
3 files changed, 13 insertions, 5 deletions
diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp
index f527b1838f..7b4a6da179 100644
--- a/lib/Bytecode/Writer/SlotCalculator.cpp
+++ b/lib/Bytecode/Writer/SlotCalculator.cpp
@@ -174,8 +174,12 @@ void SlotCalculator::incorporateFunction(const Function *F) {
SC_DEBUG("Inserting Instructions:\n");
// Add all of the instructions to the type planes...
- for_each(inst_begin(F), inst_end(F),
- bind_obj(this, &SlotCalculator::getOrCreateSlot));
+ for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
+ for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) {
+ getOrCreateSlot(I);
+ //if (const VANextInst *VAN = dyn_cast<VANextInst>(I))
+ // getOrCreateSlot(VAN->getArgType());
+ }
if (!IgnoreNamedNodes) {
SC_DEBUG("Inserting SymbolTable values:\n");
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index a1ebd91737..b755c6f913 100644
--- a/lib/VMCore/Constants.cpp
+++ b/lib/VMCore/Constants.cpp
@@ -268,7 +268,7 @@ ConstantStruct::ConstantStruct(const StructType *T,
Operands.reserve(V.size());
for (unsigned i = 0, e = V.size(); i != e; ++i) {
assert((V[i]->getType() == ETypes[i] ||
- (ETypes[i]->isAbstract() &&
+ ((ETypes[i]->isAbstract() || V[i]->getType()->isAbstract()) &&
ETypes[i]->getPrimitiveID()==V[i]->getType()->getPrimitiveID())) &&
"Initializer for struct element doesn't match struct element type!");
Operands.push_back(Use(V[i], this));
diff --git a/lib/VMCore/SlotCalculator.cpp b/lib/VMCore/SlotCalculator.cpp
index f527b1838f..7b4a6da179 100644
--- a/lib/VMCore/SlotCalculator.cpp
+++ b/lib/VMCore/SlotCalculator.cpp
@@ -174,8 +174,12 @@ void SlotCalculator::incorporateFunction(const Function *F) {
SC_DEBUG("Inserting Instructions:\n");
// Add all of the instructions to the type planes...
- for_each(inst_begin(F), inst_end(F),
- bind_obj(this, &SlotCalculator::getOrCreateSlot));
+ for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
+ for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) {
+ getOrCreateSlot(I);
+ //if (const VANextInst *VAN = dyn_cast<VANextInst>(I))
+ // getOrCreateSlot(VAN->getArgType());
+ }
if (!IgnoreNamedNodes) {
SC_DEBUG("Inserting SymbolTable values:\n");