aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-11-05 21:20:28 +0000
committerDale Johannesen <dalej@apple.com>2007-11-05 21:20:28 +0000
commitcfb19e6297a5527845fd6c14b7dff5dea34b6a25 (patch)
treeb09932726b145c3501614679561c699708a4dc48 /lib/Bitcode/Reader/BitcodeReader.cpp
parenta23f9db964559748fcac9446dc65659ada3e21d1 (diff)
downloadexternal_llvm-cfb19e6297a5527845fd6c14b7dff5dea34b6a25.zip
external_llvm-cfb19e6297a5527845fd6c14b7dff5dea34b6a25.tar.gz
external_llvm-cfb19e6297a5527845fd6c14b7dff5dea34b6a25.tar.bz2
Make labels work in asm blocks; allow labels as
parameters. Rename ValueRefList to ParamList in AsmParser, since its only use is for parameters. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index 7278557..0bacf0f 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1506,7 +1506,10 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
SmallVector<Value*, 16> Args;
// Read the fixed params.
for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i, ++OpNum) {
- Args.push_back(getFnValueByID(Record[OpNum], FTy->getParamType(i)));
+ if (FTy->getParamType(i)->getTypeID()==Type::LabelTyID)
+ Args.push_back(getBasicBlock(Record[OpNum]));
+ else
+ Args.push_back(getFnValueByID(Record[OpNum], FTy->getParamType(i)));
if (Args.back() == 0) return Error("Invalid CALL record");
}