[PATCH] D33659: Extend DynamicLibrary class to be usable without loading permanently.

2017-07-06 Thread Frederich Munch via Phabricator via cfe-commits
marsupial added a comment.

ping


https://reviews.llvm.org/D33659



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D33659: Extend DynamicLibrary class to be usable without loading permanently.

2017-07-06 Thread Frederich Munch via Phabricator via cfe-commits
marsupial updated this revision to Diff 105466.

https://reviews.llvm.org/D33659

Files:
  lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp


Index: lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
===
--- lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -53,23 +53,23 @@
i != e; ++i) {
 // Get access to the plugin.
 std::string err;
-DynamicLibrary lib = DynamicLibrary::getPermanentLibrary(i->c_str(), &err);
-if (!lib.isValid()) {
+DynamicLibrary *lib = DynamicLibrary::getPermanentLibrary(i->c_str(), 
&err);
+if (!lib) {
   diags->Report(diag::err_fe_unable_to_load_plugin) << *i << err;
   continue;
 }
 
 // See if it's compatible with this build of clang.
 const char *pluginAPIVersion =
-  (const char *) lib.getAddressOfSymbol("clang_analyzerAPIVersionString");
+  (const char *) lib->getAddressOfSymbol("clang_analyzerAPIVersionString");
 if (!isCompatibleAPIVersion(pluginAPIVersion)) {
   warnIncompatible(diags, *i, pluginAPIVersion);
   continue;
 }
 
 // Register its checkers.
 RegisterCheckersFn registerPluginCheckers =
-  (RegisterCheckersFn) (intptr_t) lib.getAddressOfSymbol(
+  (RegisterCheckersFn) (intptr_t) lib->getAddressOfSymbol(
   
"clang_registerCheckers");
 if (registerPluginCheckers)
   registerPluginCheckers(*this);


Index: lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
===
--- lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -53,23 +53,23 @@
i != e; ++i) {
 // Get access to the plugin.
 std::string err;
-DynamicLibrary lib = DynamicLibrary::getPermanentLibrary(i->c_str(), &err);
-if (!lib.isValid()) {
+DynamicLibrary *lib = DynamicLibrary::getPermanentLibrary(i->c_str(), &err);
+if (!lib) {
   diags->Report(diag::err_fe_unable_to_load_plugin) << *i << err;
   continue;
 }
 
 // See if it's compatible with this build of clang.
 const char *pluginAPIVersion =
-  (const char *) lib.getAddressOfSymbol("clang_analyzerAPIVersionString");
+  (const char *) lib->getAddressOfSymbol("clang_analyzerAPIVersionString");
 if (!isCompatibleAPIVersion(pluginAPIVersion)) {
   warnIncompatible(diags, *i, pluginAPIVersion);
   continue;
 }
 
 // Register its checkers.
 RegisterCheckersFn registerPluginCheckers =
-  (RegisterCheckersFn) (intptr_t) lib.getAddressOfSymbol(
+  (RegisterCheckersFn) (intptr_t) lib->getAddressOfSymbol(
   "clang_registerCheckers");
 if (registerPluginCheckers)
   registerPluginCheckers(*this);
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D33659: Extend DynamicLibrary class to be usable without loading permanently.

2017-05-29 Thread Frederich Munch via Phabricator via cfe-commits
marsupial created this revision.

https://reviews.llvm.org/D33659

Files:
  lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp


Index: lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
===
--- lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -53,8 +53,8 @@
i != e; ++i) {
 // Get access to the plugin.
 std::string err;
-DynamicLibrary lib = DynamicLibrary::getPermanentLibrary(i->c_str(), &err);
-if (!lib.isValid()) {
+DynamicLibrary *lib = DynamicLibrary::getPermanentLibrary(i->c_str(), 
&err);
+if (!lib) {
   diags->Report(diag::err_fe_unable_to_load_plugin) << *i << err;
   continue;
 }


Index: lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
===
--- lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -53,8 +53,8 @@
i != e; ++i) {
 // Get access to the plugin.
 std::string err;
-DynamicLibrary lib = DynamicLibrary::getPermanentLibrary(i->c_str(), &err);
-if (!lib.isValid()) {
+DynamicLibrary *lib = DynamicLibrary::getPermanentLibrary(i->c_str(), &err);
+if (!lib) {
   diags->Report(diag::err_fe_unable_to_load_plugin) << *i << err;
   continue;
 }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits