Skip to content

Instantly share code, notes, and snippets.

@mur6
Last active April 25, 2019 03:55
Show Gist options
  • Save mur6/403acdf1b5a6ec3b31d76c6e2d3e62c6 to your computer and use it in GitHub Desktop.
Save mur6/403acdf1b5a6ec3b31d76c6e2d3e62c6 to your computer and use it in GitHub Desktop.

llvm.md

LLVM bitcode基礎知識 - Qiita

clang -emit-llvm -c clangtest.cpp
clang -emit-llvm -c main.cpp
clang -emit-llvm main.cpp
clang -S -emit-llvm main.cpp
clang -S -emit-llvm -O2 test.c
clang -c -S -emit-llvm a.c
#include <array>
#include <vector>
#include <iostream>

auto test(const int num)
{
    std::vector<int> arr(num, 19);
    return arr;
}

int main(int argc, char const *argv[])
{
    std::array arr{1, 2, 3, 4, 5};
    for (const auto &i : arr)
        std::cout << i << std::endl;
    for (const auto &i : test(20))
    {
        std::cout << i << std::endl;
    }
    return 0;
}
int main() {
  return 42;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment