From 3a24f9230a3e24c74fbf711fc1090a0d1a3e42cd Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 7 Oct 2010 22:03:01 +0000 Subject: Provie a clearner interface so that FE can decide whether a function has prototype or not. llvm-svn: 115988 --- llvm/include/llvm/Analysis/DebugInfo.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'llvm/include') diff --git a/llvm/include/llvm/Analysis/DebugInfo.h b/llvm/include/llvm/Analysis/DebugInfo.h index 8b4a4c184e8..26118c26bc8 100644 --- a/llvm/include/llvm/Analysis/DebugInfo.h +++ b/llvm/include/llvm/Analysis/DebugInfo.h @@ -55,7 +55,8 @@ namespace llvm { FlagBlockByrefStruct = 1 << 4, FlagVirtual = 1 << 5, FlagArtificial = 1 << 6, - FlagExplicit = 1 << 7 + FlagExplicit = 1 << 7, + FlagPrototyped = 1 << 8 }; protected: const MDNode *DbgNode; @@ -422,6 +423,12 @@ namespace llvm { return false; return (getUnsignedField(14) & FlagExplicit) != 0; } + /// isPrototyped - Return true if this subprogram is prototyped. + bool isPrototyped() const { + if (getVersion() <= llvm::LLVMDebugVersion8) + return false; + return (getUnsignedField(14) & FlagPrototyped) != 0; + } unsigned isOptimized() const; -- cgit v1.2.3