X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FIR%2FModule.cpp;h=82b129777f7114141a3ba264a3b0c7be6b7a6c39;hb=8545f7f946f98c47b6a539fb19595ac6072e6967;hp=3e8f91fee743a94ac001bf05ee4839598bb9b8e1;hpb=dc6141a4ff04291f76dced9bd0155470cfbe7a5d;p=oota-llvm.git diff --git a/lib/IR/Module.cpp b/lib/IR/Module.cpp index 3e8f91fee74..82b129777f7 100644 --- a/lib/IR/Module.cpp +++ b/lib/IR/Module.cpp @@ -394,15 +394,15 @@ std::error_code Module::materialize(GlobalValue *GV) { return Materializer->materialize(GV); } -void Module::Dematerialize(GlobalValue *GV) { +void Module::dematerialize(GlobalValue *GV) { if (Materializer) - return Materializer->Dematerialize(GV); + return Materializer->dematerialize(GV); } std::error_code Module::materializeAll() { if (!Materializer) return std::error_code(); - return Materializer->MaterializeModule(this); + return Materializer->materializeModule(this); } std::error_code Module::materializeAllPermanently() { @@ -458,7 +458,14 @@ void Module::dropAllReferences() { unsigned Module::getDwarfVersion() const { auto *Val = cast_or_null(getModuleFlag("Dwarf Version")); if (!Val) - return dwarf::DWARF_VERSION; + return 0; + return cast(Val->getValue())->getZExtValue(); +} + +unsigned Module::getCodeViewFlag() const { + auto *Val = cast_or_null(getModuleFlag("CodeView")); + if (!Val) + return 0; return cast(Val->getValue())->getZExtValue(); }