Remove an unnecessary use of pointee types introduced in r194220
[oota-llvm.git] / lib / IR / Module.cpp
index 043f74e12da3e73a47772c2d500774ccd6f35d8f..82b129777f7114141a3ba264a3b0c7be6b7a6c39 100644 (file)
@@ -458,7 +458,14 @@ void Module::dropAllReferences() {
 unsigned Module::getDwarfVersion() const {
   auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("Dwarf Version"));
   if (!Val)
-    return dwarf::DWARF_VERSION;
+    return 0;
+  return cast<ConstantInt>(Val->getValue())->getZExtValue();
+}
+
+unsigned Module::getCodeViewFlag() const {
+  auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("CodeView"));
+  if (!Val)
+    return 0;
   return cast<ConstantInt>(Val->getValue())->getZExtValue();
 }