summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite/Frontend
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-10-13 10:34:21 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-10-13 10:34:21 +0000
commita5732844a643ac94bad0e2c08fe259018145a755 (patch)
tree261de9232663e90b7045677f2e9e7ae8ad25aa6e /clang/lib/Rewrite/Frontend
parentae726a93e31e2c16ce78cba296469d0c288f21d5 (diff)
downloadbcm5719-llvm-a5732844a643ac94bad0e2c08fe259018145a755.tar.gz
bcm5719-llvm-a5732844a643ac94bad0e2c08fe259018145a755.zip
Windows: Use GetModuleHandleEx instead of LoadLibrary
We were using an anti-pattern of: - LoadLibrary - GetProcAddress - FreeLibrary This is problematic because of several reasons: - We are holding on to pointers into a library we just unloaded. - Calling LoadLibrary results in an increase in the reference count of the library in question and any libraries that it depends on and so-on and so-forth. This is none too quick. Instead, use GetModuleHandleEx with GET_MODULE_HANDLE_EX_FLAG_PIN. This is done because because we didn't bring the reference for the library into existence and therefor shouldn't count on it being around later. llvm-svn: 192550
Diffstat (limited to 'clang/lib/Rewrite/Frontend')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud