문제

I was wondering if there was a way to access environment variables while writing an LLVM pass. In my source file, I read a certain environment variable, depending on whose value the execution is furthered. I ought to recreate that in my pass and add a few checks therein.

I would really appreciate if there was some tutorial laying out these details in form of examples.

도움이 되었습니까?

해결책

You should be able to just use cstdlib's getenv function in your pass, just like in any other C++ code.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top