aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-18 01:04:19 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-18 01:04:19 +0000
commitacc928042daf6912267544a623bdaba3633fec36 (patch)
tree07584eb67358c5eb60294f4b7834b18b380b58d5
parentb0104d07ee56e1d44a58b80eef153d73ed610a7a (diff)
downloadexternal_llvm-acc928042daf6912267544a623bdaba3633fec36.zip
external_llvm-acc928042daf6912267544a623bdaba3633fec36.tar.gz
external_llvm-acc928042daf6912267544a623bdaba3633fec36.tar.bz2
Shrink some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14956 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/AsmWriter.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 47b4cc8..225bd18 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -766,10 +766,7 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
if (GV->hasInitializer()) {
Constant* C = cast<Constant>(GV->getInitializer());
assert(C && "GlobalVar initializer isn't constant?");
- if (isa<GlobalValue>(C))
- writeOperand(GV->getInitializer(), false, true);
- else
- writeOperand(GV->getInitializer(), false, false);
+ writeOperand(GV->getInitializer(), false, isa<GlobalValue>(C));
}
printInfoComment(*GV);