Prefix annotation by $clingAutoload$ to not confuse it with others.
This commit is contained in:
parent
e74ae3cf0f
commit
b94722690f
@ -40,7 +40,7 @@ namespace cling {
|
||||
= sema.getDiagnostics().getCustomDiagID(DiagnosticsEngine::Level::Note,
|
||||
"Type : %0 , Full Path: %1")*/;
|
||||
|
||||
sema.Diags.Report(l, id) << name << header;
|
||||
sema.Diags.Report(l, id) << name << header.drop_front(15);
|
||||
|
||||
}
|
||||
|
||||
@ -58,9 +58,14 @@ namespace cling {
|
||||
AutoloadCallback::FwdDeclsMap* m_Map;
|
||||
clang::Preprocessor* m_PP;
|
||||
private:
|
||||
void InsertIntoAutoloadingState (Decl* decl, std::string annotation) {
|
||||
void InsertIntoAutoloadingState (Decl* decl, llvm::StringRef annotation) {
|
||||
|
||||
assert(!annotation.empty() && "Empty annotation!");
|
||||
if (annotation != llvm::StringRef("$clingAutoload$", 15)) {
|
||||
// not an autoload annotation.
|
||||
return;
|
||||
}
|
||||
|
||||
assert(annotation != "" && "Empty annotation!");
|
||||
assert(m_PP);
|
||||
|
||||
const FileEntry* FE = 0;
|
||||
@ -69,10 +74,11 @@ namespace cling {
|
||||
const DirectoryLookup* LookupFrom = 0;
|
||||
const DirectoryLookup* CurDir = 0;
|
||||
|
||||
FE = m_PP->LookupFile(fileNameLoc, annotation, isAngled, LookupFrom,
|
||||
CurDir, /*SearchPath*/0, /*RelativePath*/ 0,
|
||||
/*suggestedModule*/0, /*SkipCache*/false,
|
||||
/*OpenFile*/ false, /*CacheFail*/ false);
|
||||
FE = m_PP->LookupFile(fileNameLoc, annotation.data() + 15, isAngled,
|
||||
LookupFrom, CurDir, /*SearchPath*/0,
|
||||
/*RelativePath*/ 0, /*suggestedModule*/0,
|
||||
/*SkipCache*/false, /*OpenFile*/ false,
|
||||
/*CacheFail*/ false);
|
||||
|
||||
assert(FE && "Must have a valid FileEntry");
|
||||
|
||||
|
@ -162,8 +162,8 @@ namespace cling {
|
||||
}
|
||||
std::string file = PLocs[PLocs.size() -1].getFilename();
|
||||
// assert ( file.length() != 0 && "Filename Should not be blank");
|
||||
Out() << " __attribute__((annotate(\""
|
||||
<< file;
|
||||
Out() << " __attribute__((annotate(\"$clingAutoload$"
|
||||
<< llvm::StringRef(includeText, includeEnd - includeText);
|
||||
if (!extra.empty())
|
||||
Out() << " " << extra;
|
||||
Out() << "\"))) ";
|
||||
|
Loading…
Reference in New Issue
Block a user