aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-18 00:16:21 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-18 00:16:21 +0000
commite0125b678539029091e70695cf4219ec2c297a25 (patch)
tree7d806c0fc443c119f493100dffbb06229ed7f8b9
parent89fc0e3ce0fe7538d68c2ac1c2c1e7c67074af08 (diff)
downloadexternal_llvm-e0125b678539029091e70695cf4219ec2c297a25.zip
external_llvm-e0125b678539029091e70695cf4219ec2c297a25.tar.gz
external_llvm-e0125b678539029091e70695cf4219ec2c297a25.tar.bz2
bug 122:
- Correct ordering of tests because for GlobalValue isa Constant git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14941 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Bytecode/Writer/Writer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 8686f49..395386d 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/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