mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-30 00:16:48 +00:00
fix an obvious bug found by clang++ and collapse a redundant if.
Here's the diagnostic from clang: /Volumes/Data/dgregor/Projects/llvm/lib/Target/CppBackend/CPPBackend.cpp:989:23: warning: 'gv' is always NULL in this context printConstant(gv); ^ 1 diagnostic generated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91318 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -984,13 +984,12 @@ namespace {
|
||||
} else if (GlobalVariable* gv = dyn_cast<GlobalVariable>(Init)) {
|
||||
nl(Out) << "// Global Variable Declarations"; nl(Out);
|
||||
printVariableHead(gv);
|
||||
} else {
|
||||
nl(Out) << "// Constant Definitions"; nl(Out);
|
||||
printConstant(gv);
|
||||
}
|
||||
if (GlobalVariable* gv = dyn_cast<GlobalVariable>(Init)) {
|
||||
|
||||
nl(Out) << "// Global Variable Definitions"; nl(Out);
|
||||
printVariableBody(gv);
|
||||
} else {
|
||||
nl(Out) << "// Constant Definitions"; nl(Out);
|
||||
printConstant(Init);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user