diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-30 17:37:31 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-30 17:37:31 +0000 | 
| commit | ee2f195dd3e40f49698ca4dc2666ec09c770e80d (patch) | |
| tree | 66fa9a69e5789356dfe844991e64bac9222f3a35 /lib/Support | |
| parent | ab44ce3d598882e51a25eb82eb7ae6308de85ae6 (diff) | |
Notes
Diffstat (limited to 'lib/Support')
| -rw-r--r-- | lib/Support/APFloat.cpp | 2 | ||||
| -rw-r--r-- | lib/Support/Timer.cpp | 13 | 
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp index e1e2c22e1df1a..f36c25a0ce914 100644 --- a/lib/Support/APFloat.cpp +++ b/lib/Support/APFloat.cpp @@ -1559,11 +1559,13 @@ IEEEFloat::opStatus IEEEFloat::divideSpecials(const IEEEFloat &rhs) {    case PackCategoriesIntoKey(fcInfinity, fcNaN):      category = fcNaN;      copySignificand(rhs); +    LLVM_FALLTHROUGH;    case PackCategoriesIntoKey(fcNaN, fcZero):    case PackCategoriesIntoKey(fcNaN, fcNormal):    case PackCategoriesIntoKey(fcNaN, fcInfinity):    case PackCategoriesIntoKey(fcNaN, fcNaN):      sign = false; +    LLVM_FALLTHROUGH;    case PackCategoriesIntoKey(fcInfinity, fcZero):    case PackCategoriesIntoKey(fcInfinity, fcNormal):    case PackCategoriesIntoKey(fcZero, fcInfinity): diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp index 8d68c6ae9682a..dec6baf7bf476 100644 --- a/lib/Support/Timer.cpp +++ b/lib/Support/Timer.cpp @@ -72,10 +72,15 @@ std::unique_ptr<raw_fd_ostream> llvm::CreateInfoOutputFile() {    return llvm::make_unique<raw_fd_ostream>(2, false); // stderr.  } -static TimerGroup *getDefaultTimerGroup() { -  static TimerGroup DefaultTimerGroup("misc", "Miscellaneous Ungrouped Timers"); -  return &DefaultTimerGroup; -} +namespace { +struct CreateDefaultTimerGroup { +  static void *call() { +    return new TimerGroup("misc", "Miscellaneous Ungrouped Timers"); +  } +}; +} // namespace +static ManagedStatic<TimerGroup, CreateDefaultTimerGroup> DefaultTimerGroup; +static TimerGroup *getDefaultTimerGroup() { return &*DefaultTimerGroup; }  //===----------------------------------------------------------------------===//  // Timer Implementation  | 
