Skip to content

Commit 4365904

Browse files
committed
Fix build on Ubuntu 14.04
Apparently we cannot have nice things like c++14.
1 parent be2bb84 commit 4365904

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ let package = Package(
6464
path: "lib/LLVMSupport"),
6565
],
6666

67-
cxxLanguageStandard: .cxx14
67+
cxxLanguageStandard: .cxx11
6868
)

include/indexstore/IndexStoreCXX.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,15 @@ class IndexStore {
212212
return;
213213
}
214214

215+
#pragma clang diagnostic push
216+
#pragma clang diagnostic ignored "-Wc++14-extensions"
215217
auto fnPtr = new RawUnitEventHandler([handler, localLib=std::move(localLib)](
216218
indexstore_unit_event_notification_t evt_note) {
217219
if (auto lib = localLib.lock()) {
218220
handler(UnitEventNotification(evt_note, lib));
219221
}
220222
});
223+
#pragma clang diagnostic pop
221224
api().store_set_unit_event_handler_f(obj, fnPtr, event_handler, event_handler_finalizer);
222225
}
223226

lib/Support/Logging.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Logger::Level Logger::getLogLevelByNum(unsigned LevelNum) {
8181
}
8282

8383
unsigned Logger::getCurrentLogLevelNum() {
84-
switch (LoggingLevel) {
84+
switch (LoggingLevel.load()) {
8585
case Level::None:
8686
case Level::Warning:
8787
return 0;

0 commit comments

Comments
 (0)