From: Axel Naumann Date: Fri, 19 Sep 2014 14:51:17 +0000 (+0200) Subject: Make sure we have a cling autoload annotation. X-Git-Tag: v6-02-00-rc1~41 X-Git-Url: https://root.cern.ch/gitweb?p=root.git;a=commitdiff_plain;h=2ae0fc61c3ac681482a0e4a6120ee19ecbad7e7f Make sure we have a cling autoload annotation. --- diff --git a/interpreter/cling/lib/Interpreter/AutoloadCallback.cpp b/interpreter/cling/lib/Interpreter/AutoloadCallback.cpp index 372ee43..524c4a0 100644 --- a/interpreter/cling/lib/Interpreter/AutoloadCallback.cpp +++ b/interpreter/cling/lib/Interpreter/AutoloadCallback.cpp @@ -40,7 +40,8 @@ namespace cling { = sema.getDiagnostics().getCustomDiagID(DiagnosticsEngine::Level::Note, "Type : %0 , Full Path: %1")*/; - sema.Diags.Report(l, id) << name << header.drop_front(15); + if (header.startswith(llvm::StringRef("$clingAutoload$", 15))) + sema.Diags.Report(l, id) << name << header.drop_front(15); } @@ -59,7 +60,7 @@ namespace cling { void InsertIntoAutoloadingState (Decl* decl, llvm::StringRef annotation) { assert(!annotation.empty() && "Empty annotation!"); - if (annotation != llvm::StringRef("$clingAutoload$", 15)) { + if (!annotation.startswith(llvm::StringRef("$clingAutoload$", 15))) { // not an autoload annotation. return; }