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
This commit is contained in:
Ed Maste 2014-05-07 12:49:08 +00:00
parent b2d170d61b
commit fe0b2279a8

View File

@ -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; }