From fe0b2279a80f62e16bc6a40d49261076b8532bf7 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 7 May 2014 12:49:08 +0000 Subject: [PATCH] DebugInfo: Use enum instead of unsigned This makes debuging DebugInfo generation with LLDB a little more pleasant. Differential Revision: http://reviews.llvm.org/D3626 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208202 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/DebugInfo.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }