mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-20 10:30:03 +00:00
Appropriately mark fowrad decls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62625 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eeb90e3094
commit
2a574669f3
@ -129,6 +129,13 @@ namespace llvm {
|
|||||||
/// FIXME: Types should be factored much better so that CV qualifiers and
|
/// FIXME: Types should be factored much better so that CV qualifiers and
|
||||||
/// others do not require a huge and empty descriptor full of zeros.
|
/// others do not require a huge and empty descriptor full of zeros.
|
||||||
class DIType : public DIDescriptor {
|
class DIType : public DIDescriptor {
|
||||||
|
public:
|
||||||
|
enum {
|
||||||
|
FlagPrivate = 1 << 0,
|
||||||
|
FlagProtected = 1 << 1,
|
||||||
|
FlagFwdDecl = 1 << 2
|
||||||
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DIType(GlobalVariable *GV, unsigned Tag) : DIDescriptor(GV, Tag) {}
|
DIType(GlobalVariable *GV, unsigned Tag) : DIDescriptor(GV, Tag) {}
|
||||||
// This ctor is used when the Tag has already been validated by a derived
|
// This ctor is used when the Tag has already been validated by a derived
|
||||||
@ -167,6 +174,9 @@ namespace llvm {
|
|||||||
// carry this is just plain insane.
|
// carry this is just plain insane.
|
||||||
uint64_t getOffsetInBits() const { return getUInt64Field(7); }
|
uint64_t getOffsetInBits() const { return getUInt64Field(7); }
|
||||||
unsigned getFlags() const { return getUnsignedField(8); }
|
unsigned getFlags() const { return getUnsignedField(8); }
|
||||||
|
bool isPrivate() const { return (getFlags() & FlagPrivate) != 0; }
|
||||||
|
bool isProtected() const { return (getFlags() & FlagProtected) != 0; }
|
||||||
|
bool isForwardDecl() const { return (getFlags() & FlagFwdDecl) != 0; }
|
||||||
|
|
||||||
virtual std::string getFilename() const {
|
virtual std::string getFilename() const {
|
||||||
assert (0 && "Invalid DIDescriptor");
|
assert (0 && "Invalid DIDescriptor");
|
||||||
|
@ -1820,19 +1820,16 @@ private:
|
|||||||
if (Size)
|
if (Size)
|
||||||
AddUInt(&Buffer, DW_AT_byte_size, 0, Size);
|
AddUInt(&Buffer, DW_AT_byte_size, 0, Size);
|
||||||
else {
|
else {
|
||||||
// Add zero size even if it is not a forward declaration.
|
// Add zero size if it is not a forward declaration.
|
||||||
// FIXME - Enable this.
|
if (CTy.isForwardDecl())
|
||||||
// if (!CTy.isDefinition())
|
AddUInt(&Buffer, DW_AT_declaration, DW_FORM_flag, 1);
|
||||||
// AddUInt(&Buffer, DW_AT_declaration, DW_FORM_flag, 1);
|
else
|
||||||
// else
|
AddUInt(&Buffer, DW_AT_byte_size, 0, 0);
|
||||||
// AddUInt(&Buffer, DW_AT_byte_size, 0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add source line info if available and TyDesc is not a forward
|
// Add source line info if available.
|
||||||
// declaration.
|
if (!CTy.isForwardDecl())
|
||||||
// FIXME - Enable this.
|
AddSourceLine(&Buffer, &CTy);
|
||||||
// if (CTy.isForwardDecl())
|
|
||||||
// AddSourceLine(&Buffer, *CTy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConstructSubrangeDIE - Construct subrange DIE from DISubrange.
|
// ConstructSubrangeDIE - Construct subrange DIE from DISubrange.
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
; RUN: llvm-as < %s | llc | %prcontext ST 1 | grep 0x1 | count 1
|
; RUN: llvm-as < %s | llc | %prcontext ST 1 | grep 0x1 | count 1
|
||||||
; XFAIL: *
|
|
||||||
|
|
||||||
target triple = "i386-apple-darwin9.6"
|
target triple = "i386-apple-darwin9.6"
|
||||||
%llvm.dbg.anchor.type = type { i32, i32 }
|
%llvm.dbg.anchor.type = type { i32, i32 }
|
||||||
|
Loading…
Reference in New Issue
Block a user