[llvm] ab6e9a4 - [Chrono] Add missing include <ratio>.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 00:59:39 PST 2022


Author: Florian Hahn
Date: 2022-01-18T08:59:12Z
New Revision: ab6e9a44ba8011d537cb71381c2a41a5e3354507

URL: https://github.com/llvm/llvm-project/commit/ab6e9a44ba8011d537cb71381c2a41a5e3354507
DIFF: https://github.com/llvm/llvm-project/commit/ab6e9a44ba8011d537cb71381c2a41a5e3354507.diff

LOG: [Chrono] Add missing include <ratio>.

The file uses std::ratio without including the correct header.
Previously ratio was indirectly provided through chrono in libc++ but
that's not the case any longer.

This should fix a build failure with modules enabled:
https://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/5185/console

Added: 
    

Modified: 
    llvm/include/llvm/Support/Chrono.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/Chrono.h b/llvm/include/llvm/Support/Chrono.h
index 629a37a90aae7..9c2bd45d2803e 100644
--- a/llvm/include/llvm/Support/Chrono.h
+++ b/llvm/include/llvm/Support/Chrono.h
@@ -14,6 +14,7 @@
 
 #include <chrono>
 #include <ctime>
+#include <ratio>
 
 namespace llvm {
 


        


More information about the llvm-commits mailing list