[llvm] r208202 - DebugInfo: Use enum instead of unsigned

Ed Maste emaste at freebsd.org
Wed May 7 05:49:08 PDT 2014


Author: emaste
Date: Wed May  7 07:49:08 2014
New Revision: 208202

URL: http://llvm.org/viewvc/llvm-project?rev=208202&view=rev
Log:
DebugInfo: Use enum instead of unsigned

This makes debuging DebugInfo generation with LLDB a little more pleasant.

Differential Revision: http://reviews.llvm.org/D3626

Modified:
    llvm/trunk/include/llvm/IR/DebugInfo.h

Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=208202&r1=208201&r2=208202&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfo.h Wed May  7 07:49:08 2014
@@ -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<dwarf::SourceLanguage>(getUnsignedField(2));
+  }
   StringRef getProducer() const { return getStringField(3); }
 
   bool isOptimized() const { return getUnsignedField(4) != 0; }





More information about the llvm-commits mailing list