DebugInfo: Use enum instead of unsigned

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

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

llvm-svn: 208202
This commit is contained in:
Ed Maste 2014-05-07 12:49:08 +00:00
parent 13d7209fa9
commit fd122267c4
1 changed files with 3 additions and 1 deletions

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