Beef icon indicating copy to clipboard operation
Beef copied to clipboard

Broken module found

Open disarray2077 opened this issue 3 years ago • 0 comments

The below code fails to compile on Linux/Wasm because of the following LLVM error:

Broken module found, compilation aborted! in D:\BeefLang\Repository\Beef\IDEHelper\DebugManager.cpp:578
inlinable function call in a function with debug info must have a !dbg location
  call void @_ZN2bf9test_wasm7Program3fooEPNS_6System6StringE(%corlib._ZTSN2bf6System6StringE* %6)
inlinable function call in a function with debug info must have a !dbg location
  call void @_ZN2bf9test_wasm7Program3fooEPNS_6System6StringE(%corlib._ZTSN2bf6System6StringE* %6)

Code:

	class Program
	{
		static void foo(String a)
		{
		}

		static bool bar()
		{
			return false;
		}

		public static int Main()
		{
			if (!bar())
			{
				foo(scope $@"Test: {scope String("Test")}");
				return -1;
			}
			return 0;
		}
	}

Tested with: https://github.com/beefytech/Beef/commit/7293fed046f5f113262d234fab17d7e34025f92c

disarray2077 avatar Nov 22 '22 19:11 disarray2077