diff --git a/include/llvm/IR/DebugInfo.h b/include/llvm/IR/DebugInfo.h index 1b97f625421..65e0a0625f7 100644 --- a/include/llvm/IR/DebugInfo.h +++ b/include/llvm/IR/DebugInfo.h @@ -427,7 +427,9 @@ class DICompileUnit : public DIScope { public: explicit DICompileUnit(const MDNode *N = nullptr) : DIScope(N) {} - unsigned getLanguage() const { return getUnsignedField(2); } + dwarf::SourceLanguage getLanguage() const { + return static_cast(getUnsignedField(2)); + } StringRef getProducer() const { return getStringField(3); } bool isOptimized() const { return getUnsignedField(4) != 0; }