Fix build error that is apparently only a warning with some compilers.

llvm-svn: 25686
This commit is contained in:
Chris Lattner 2006-01-27 17:31:30 +00:00
parent 2b6efa9d41
commit ecd7e61a1f
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ getGlobalVariablesUsing(Module &M, const std::string &RootName) {
/// getStringValue - Turn an LLVM constant pointer that eventually points to a /// getStringValue - Turn an LLVM constant pointer that eventually points to a
/// global into a string value. Return an empty string if we can't do it. /// global into a string value. Return an empty string if we can't do it.
/// ///
const static std::string getStringValue(Value *V, unsigned Offset = 0) { static const std::string getStringValue(Value *V, unsigned Offset = 0) {
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V)) { if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V)) {
if (GV->hasInitializer() && isa<ConstantArray>(GV->getInitializer())) { if (GV->hasInitializer() && isa<ConstantArray>(GV->getInitializer())) {
ConstantArray *Init = cast<ConstantArray>(GV->getInitializer()); ConstantArray *Init = cast<ConstantArray>(GV->getInitializer());