This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://godbolt.org/g/tg84qZ | |
| #include <cstdint> | |
| #include <cstdlib> | |
| //! return the length in code points | |
| size_t utf8strlen(const char* ptr) | |
| { | |
| size_t i = 0, l = 0; | |
| while (ptr[i]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include <cstdint> | |
| #include <cstddef> | |
| #include <cstdlib> | |
| #include <type_traits> | |
| #define IS_64BIT (__x86_64__ || _M_X64 || __aarch64__) | |
| #define IS_THUMB (__thumb__ || _M_ARMT) | |
| #define IS_ARM (__arm__ || _M_ARM || __aarch64__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define GLEW_STATIC | |
| #include <GL/glew.h> // include GLEW and new version of GL on Windows | |
| #include <GL/glfw.h> // GLFW helper library | |
| #include <stdio.h> | |
| #include <string> | |
| static void listVideoModes() | |
| { | |
| int count = 0; | |
| GLFWvidmode list[32]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct MeasureAndPrintTime | |
| { | |
| std::chrono::steady_clock::time_point start = std::chrono::steady_clock::now(); | |
| ~MeasureAndPrintTime() | |
| { | |
| auto diff = std::chrono::steady_clock::now() - start; | |
| auto usecs = std::chrono::duration_cast<std::chrono::microseconds>(diff).count(); | |
| printf("took %lldus\n", (long long)usecs); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // An implementation of the Aho-Corasick algorithm for string matching | |
| // using static arrays for the functions | |
| // http://en.wikipedia.org/wiki/Aho-Corasick_algorithm | |
| module automaton; | |
| import queue; | |
| public import keyword; | |
| public import list; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\Applications\photoviewer.dll] | |
| [HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell] | |
| [HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open] | |
| "MuiVerb"="@photoviewer.dll,-3043" | |
| [HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include <cstdint> | |
| #include <memory> | |
| enum class TYPE : uint16_t | |
| { | |
| None = 0, | |
| BYTE, ASCII, SHORT, LONG, RATIONAL, | |
| SBYTE, UNDEF, SSHORT, SLONG, SRATIONAL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include <type_traits> | |
| template <typename T> | |
| using is_scoped_enum = std::integral_constant<bool, std::is_enum<T>::value && !std::is_convertible<T, int>::value>; | |
| template <typename T> | |
| constexpr bool is_scoped_enum_v = is_scoped_enum<T>::value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp b/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp | |
| index fa7c352a1b6..e83c14d47e6 100644 | |
| --- a/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp | |
| +++ b/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp | |
| @@ -25,7 +25,7 @@ enum AsmWriterFlavorTy { | |
| }; | |
| static cl::opt<AsmWriterFlavorTy> AsmWriterFlavor( | |
| - "x86-asm-syntax", cl::init(ATT), cl::Hidden, | |
| + "x86-asm-syntax", cl::init(Intel), cl::Hidden, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! | |
| * Copyright (C) 2017-2018 Andreas Hollandt | |
| * | |
| * Distributed under the Boost Software License, Version 1.0. | |
| * See copy at http://boost.org/LICENSE_1_0.txt. | |
| */ | |
| #pragma once | |
| #include <exception> |