summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
authorMomchil Velikov <momchil.velikov@arm.com>2018-02-12 16:10:09 +0000
committerMomchil Velikov <momchil.velikov@arm.com>2018-02-12 16:10:09 +0000
commit08dc66eff0c7ad594584a8a6925ef830cd6873a1 (patch)
tree36a9dc79a29945f66faf9ac868a413e9733cc037 /llvm/lib/IR/DIBuilder.cpp
parentb941f5dc5f36daf6fac61b5bb2faf9e461a6cc91 (diff)
downloadbcm5719-llvm-08dc66eff0c7ad594584a8a6925ef830cd6873a1.tar.gz
bcm5719-llvm-08dc66eff0c7ad594584a8a6925ef830cd6873a1.zip
Re-commit r324489: [DebugInfo] Improvements to representation of enumeration types (PR36168)
Differential Revision: https://reviews.llvm.org/D42734 llvm-svn: 324899
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index ed3e28144d1..f9aca8afec9 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -233,9 +233,10 @@ DIMacroFile *DIBuilder::createTempMacroFile(DIMacroFile *Parent,
return MF;
}
-DIEnumerator *DIBuilder::createEnumerator(StringRef Name, int64_t Val) {
+DIEnumerator *DIBuilder::createEnumerator(StringRef Name, int64_t Val,
+ bool IsUnsigned) {
assert(!Name.empty() && "Unable to create enumerator without name");
- return DIEnumerator::get(VMContext, Val, Name);
+ return DIEnumerator::get(VMContext, Val, IsUnsigned, Name);
}
DIBasicType *DIBuilder::createUnspecifiedType(StringRef Name) {
@@ -492,11 +493,12 @@ DISubroutineType *DIBuilder::createSubroutineType(DITypeRefArray ParameterTypes,
DICompositeType *DIBuilder::createEnumerationType(
DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
- DIType *UnderlyingType, StringRef UniqueIdentifier) {
+ DIType *UnderlyingType, StringRef UniqueIdentifier, bool IsFixed) {
auto *CTy = DICompositeType::get(
VMContext, dwarf::DW_TAG_enumeration_type, Name, File, LineNumber,
getNonCompileUnitScope(Scope), UnderlyingType, SizeInBits, AlignInBits, 0,
- DINode::FlagZero, Elements, 0, nullptr, nullptr, UniqueIdentifier);
+ IsFixed ? DINode::FlagFixedEnum : DINode::FlagZero, Elements, 0, nullptr,
+ nullptr, UniqueIdentifier);
AllEnumTypes.push_back(CTy);
trackIfUnresolved(CTy);
return CTy;
OpenPOWER on IntegriCloud