summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2014-07-29 18:20:39 +0000
committerManman Ren <manman.ren@gmail.com>2014-07-29 18:20:39 +0000
commitf93ac4bfadc705760853c3bcb6463b1d58c7d1dc (patch)
treedc3888dbb8062675ae437f96aafdca67b762e47d /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
parenta3a6c12c0315d03fd8139606793b0d22ef2a57f6 (diff)
downloadbcm5719-llvm-f93ac4bfadc705760853c3bcb6463b1d58c7d1dc.tar.gz
bcm5719-llvm-f93ac4bfadc705760853c3bcb6463b1d58c7d1dc.zip
[Debug Info] remove DITrivialType and use null to represent unspecified param.
Per feedback on r214111, we are going to use null to represent unspecified parameter. If the type array is {null}, it means a function that returns void; If the type array is {null, null}, it means a variadic function that returns void. In summary if we have more than one element in the type array and the last element is null, it is a variadic function. rdar://17628609 llvm-svn: 214189
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 43c6de5b0c3..f49eaca8c23 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -1132,7 +1132,7 @@ void DwarfUnit::constructTypeDIE(DIE &Buffer, DIDerivedType DTy) {
void DwarfUnit::constructSubprogramArguments(DIE &Buffer, DITypeArray Args) {
for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) {
DIType Ty = resolve(Args.getElement(i));
- if (Ty.isUnspecifiedParameter()) {
+ if (!Ty) {
assert(i == N-1 && "Unspecified parameter must be the last argument");
createAndAddDIE(dwarf::DW_TAG_unspecified_parameters, Buffer);
} else {
@@ -1168,7 +1168,7 @@ void DwarfUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
bool isPrototyped = true;
if (Elements.getNumElements() == 2 &&
- resolve(Elements.getElement(1)).isUnspecifiedParameter())
+ !resolve(Elements.getElement(1)))
isPrototyped = false;
constructSubprogramArguments(Buffer, Elements);
OpenPOWER on IntegriCloud