mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Refactor filename/directory in DICompileUnit into a DIFile
This is the next step towards making the metadata for DIScopes have a common prefix rather than having to delegate based on their tag type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176913 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -407,7 +407,7 @@ bool DICompileUnit::Verify() const {
|
||||
if (N.empty())
|
||||
return false;
|
||||
// It is possible that directory and produce string is empty.
|
||||
return DbgNode->getNumOperands() == 14;
|
||||
return DbgNode->getNumOperands() == 13;
|
||||
}
|
||||
|
||||
/// Verify - Verify that an ObjC property is well formed.
|
||||
@@ -687,7 +687,16 @@ StringRef DIScope::getDirectory() const {
|
||||
}
|
||||
|
||||
DIArray DICompileUnit::getEnumTypes() const {
|
||||
if (!DbgNode || DbgNode->getNumOperands() < 14)
|
||||
if (!DbgNode || DbgNode->getNumOperands() < 13)
|
||||
return DIArray();
|
||||
|
||||
if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(8)))
|
||||
return DIArray(N);
|
||||
return DIArray();
|
||||
}
|
||||
|
||||
DIArray DICompileUnit::getRetainedTypes() const {
|
||||
if (!DbgNode || DbgNode->getNumOperands() < 13)
|
||||
return DIArray();
|
||||
|
||||
if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(9)))
|
||||
@@ -695,8 +704,8 @@ DIArray DICompileUnit::getEnumTypes() const {
|
||||
return DIArray();
|
||||
}
|
||||
|
||||
DIArray DICompileUnit::getRetainedTypes() const {
|
||||
if (!DbgNode || DbgNode->getNumOperands() < 14)
|
||||
DIArray DICompileUnit::getSubprograms() const {
|
||||
if (!DbgNode || DbgNode->getNumOperands() < 13)
|
||||
return DIArray();
|
||||
|
||||
if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(10)))
|
||||
@@ -704,8 +713,9 @@ DIArray DICompileUnit::getRetainedTypes() const {
|
||||
return DIArray();
|
||||
}
|
||||
|
||||
DIArray DICompileUnit::getSubprograms() const {
|
||||
if (!DbgNode || DbgNode->getNumOperands() < 14)
|
||||
|
||||
DIArray DICompileUnit::getGlobalVariables() const {
|
||||
if (!DbgNode || DbgNode->getNumOperands() < 13)
|
||||
return DIArray();
|
||||
|
||||
if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(11)))
|
||||
@@ -713,16 +723,6 @@ DIArray DICompileUnit::getSubprograms() const {
|
||||
return DIArray();
|
||||
}
|
||||
|
||||
|
||||
DIArray DICompileUnit::getGlobalVariables() const {
|
||||
if (!DbgNode || DbgNode->getNumOperands() < 14)
|
||||
return DIArray();
|
||||
|
||||
if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(12)))
|
||||
return DIArray(N);
|
||||
return DIArray();
|
||||
}
|
||||
|
||||
/// fixupObjcLikeName - Replace contains special characters used
|
||||
/// in a typical Objective-C names with '.' in a given string.
|
||||
static void fixupObjcLikeName(StringRef Str, SmallVectorImpl<char> &Out) {
|
||||
|
Reference in New Issue
Block a user