diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-07-18 00:16:21 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-07-18 00:16:21 +0000 |
commit | 51fe3361b6731f96ffdb924cb6f4769f03a99a8e (patch) | |
tree | 443ff2c2b55eed3b6cc5be1ebc08374e9f250689 /llvm/lib/Bytecode/Writer | |
parent | 1d8d08f34ab6b894be92bd382f919c9fc87d27bf (diff) | |
download | bcm5719-llvm-51fe3361b6731f96ffdb924cb6f4769f03a99a8e.tar.gz bcm5719-llvm-51fe3361b6731f96ffdb924cb6f4769f03a99a8e.zip |
bug 122:
- Correct ordering of tests because for GlobalValue isa Constant
llvm-svn: 14941
Diffstat (limited to 'llvm/lib/Bytecode/Writer')
-rw-r--r-- | llvm/lib/Bytecode/Writer/Writer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index 8686f493561..395386d6621 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/lib/Bytecode/Writer/Writer.cpp @@ -135,8 +135,8 @@ void BytecodeWriter::outputConstantsInPlane(const std::vector<const Value*> for (unsigned i = ValNo; i < ValNo+NC; ++i) { const Value *V = Plane[i]; - if (const Constant *CPV = dyn_cast<Constant>(V)) { - outputConstant(CPV); + if (const Constant *C = dyn_cast<Constant>(V)) { + outputConstant(C); } } } @@ -151,13 +151,11 @@ void BytecodeWriter::outputConstants(bool isFunction) { unsigned NumPlanes = Table.getNumPlanes(); - // Output the type plane before any constants! - if (isFunction) { + if (isFunction) + // Output the type plane before any constants! outputTypes( Table.getModuleTypeLevel() ); - } - - // Output module-level string constants before any other constants.x - if (!isFunction) + else + // Output module-level string constants before any other constants.x outputConstantStrings(); for (unsigned pno = 0; pno != NumPlanes; pno++) { @@ -397,3 +395,5 @@ void llvm::WriteBytecodeToFile(const Module *C, std::ostream &Out) { } Out.flush(); } + +// vim: sw=2 ai |